import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s1 =in.nextLine();
        String s2 =in.nextLine();

        StringBuilder s = new StringBuilder();

        for(int i = 0;i<s1.length();i++) {
            char c = s1.charAt(i);

            if(s2.indexOf(c) >0 ) {
                continue;
            }
            s.append(c);
        }
        System.out.println(s);
    }
}
